Skip to content

fix(native-eval): reject invalid harness runs - #64

Draft
vincentkoc wants to merge 1 commit into
mainfrom
fix/native-eval-run-acceptance
Draft

fix(native-eval): reject invalid harness runs#64
vincentkoc wants to merge 1 commit into
mainfrom
fix/native-eval-run-acceptance

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What does this PR do?

Records structured native-eval execution outcomes and rejects runs where every
trial failed at the harness, infrastructure, or verifier layer.

Why?

Verifier rewards are useful diagnostics, but they are not proof that the
benchmark harness executed correctly. Fully invalid runs were being presented
as completed score data, and fleet recovery could infer success without an
archived exit status.

Fixes #63

Changes

  • classify clean, agent, harness, infrastructure, and verifier outcomes
  • preserve per-trial rewards while recording run-level execution acceptance
  • exclude rejected runs from score-eligible aggregates
  • infer historical OpenClaw exit 70/71 outcomes correctly
  • remove fleet success inference based only on result count and checkpoint text

Tests

  • python -m pytest -q passes on Blacksmith Testbox
  • python -m ruff check clawbench app.py scripts tests passes on Blacksmith Testbox

Focused proof: 117 tests passed; Ruff clean. Autoreview reported no actionable
findings.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codex review: found issues before merge. Reviewed August 3, 2026, 4:13 PM ET / 20:13 UTC.

ClawSweeper review

What this changes

The PR records native-evaluation execution outcomes, excludes fully invalid runs from score-eligible aggregates, and requires fleet recovery to use an archived run exit status instead of inferring success from result coverage and a final checkpoint.

Merge readiness

Blocked by patch quality or review findings - 6 items remain

Keep this PR open: its central invalid-run rejection is valuable, but the current patch removes an existing recovery path for complete legacy exports that lack an archived exit status, turning them into failed/rerun jobs. The author is a repository member, so the compatibility policy needs explicit maintainer judgment rather than automatic closure.

Priority: P1
Reviewed head: 9f4490e8e4370cbc752404a1becce42d5a6a69f8
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The invalid-run handling is substantial and tested, but a P1 regression in existing fleet recovery makes the patch not ready to merge.
Proof confidence 🌊 off-meta tidepool Not applicable: The author is a repository member, so the external-contributor real-behavior-proof gate does not apply; CI and focused tests are supplemental evidence but do not resolve the recovery compatibility defect.
Patch quality 🧂 unranked krab (1/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The author is a repository member, so the external-contributor real-behavior-proof gate does not apply; CI and focused tests are supplemental evidence but do not resolve the recovery compatibility defect.
Evidence reviewed 5 items Removed legacy recovery behavior: The PR deletes the complete-archive plus final-checkpoint fallback after archived exit-status lookup; an export with no stored run exit status therefore continues with an unknown code.
Regression is asserted by the changed test: The PR deliberately changes the full-coverage/final-checkpoint recovery case from completed with inferred exit code 0 to failed with an unknown exit code, so the compatibility change is concrete rather than speculative.
Current main previously supports recovery: Current main retains _checkpoint_log_has_final and uses verified result coverage plus a final checkpoint to record an inferred zero exit code when the archive lacks exit_status.
Findings 1 actionable finding [P1] Preserve recovery for legacy exported runs
Security None None.

How this fits together

Native evaluation runs task trials through a harness, saves trial results and final artifacts, then aggregates scores and lets fleet recovery finalize exported runs. This PR changes how execution validity reaches both score eligibility and the fleet’s recovered completion state.

flowchart LR
  A[Native evaluation plan] --> B[Harness trial execution]
  B --> C[Trial results and execution outcomes]
  C --> D[Final archive and exit-status artifact]
  C --> E[Score aggregation]
  D --> F[Fleet recovery]
  E --> G[Score-eligible report]
  F --> H[Completed or rerun state]
Loading

Decision needed

Question Recommendation
Should verified legacy exports without an archived exit_status continue to recover through a bounded compatibility path, or should the project intentionally invalidate them and require a migration/rerun? Preserve bounded legacy recovery: Keep the prior complete-archive plus final-checkpoint path only for archives that can be positively identified as predating the exit-status contract, while requiring archived status for all new runs.

Why: The patch intentionally removes current recovery behavior, but repository evidence does not establish whether older complete exports may safely retain that path or must be invalidated; this is an upgrade-policy choice, not a mechanical review preference.

Before merge

  • Preserve recovery for legacy exported runs (P1) - This removes the only fallback for verified full-coverage exports created without an archived exit_status. The changed test confirms those archives now end as failed with an unknown exit code, so existing recoverable campaign exports can be rerun or left failed; retain a bounded legacy path or provide an explicit migration/invalid-archive policy before enforcing the new requirement.
  • Resolve merge risk (P2) - Merging this patch makes previously recoverable, verified full-coverage exports without an archived exit_status fail fleet recovery and potentially schedule a rerun, despite their final checkpoint evidence.
  • Resolve merge risk (P1) - The strict rejection goal is sound for new runs, but the branch does not establish an upgrade policy for legacy archives created before the exit-status artifact was reliably available.
  • Complete next step (P2) - A maintainer must choose the legacy-archive compatibility policy before a safe repair boundary can be automated.
  • Improve patch quality - Decide and implement the legacy archive policy, then add focused coverage for both legacy and current archive formats.

Findings

  • [P1] Preserve recovery for legacy exported runs — scripts/native_eval/fleet.py:1267-1274
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Changed surface 7 files affected: 4 production, 3 test The PR changes execution classification, score eligibility, persisted manifests, and fleet recovery, so the archive upgrade contract needs review across the full flow.
Net code change production +186/-28, tests +93/-7 Most added code implements new outcome metadata; the principal merge concern is the small removal in fleet recovery that changes existing export behavior.

Merge-risk options

Maintainer options:

  1. Restore a bounded legacy path (recommended)
    Retain recovery for positively identifiable pre-exit-status exports, and add coverage proving that current-format archives still require explicit status.
  2. Adopt strict invalidation deliberately
    Document and test an explicit migration or rerun workflow for old complete archives before removing their recovery fallback.
  3. Pause recovery-policy change
    Keep the score-validity changes but defer the fleet fallback removal until the archive upgrade policy is decided.

Technical review

Best possible solution:

Keep explicit archived exit status as the required contract for new runs, while preserving a narrowly identified legacy recovery path or adding a documented migration/invalid-archive policy with tests for both archive generations.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: current main has a focused fleet test for a verified full-coverage archive with a final checkpoint and no archived exit status, while this PR changes that same case from completed to failed. The review is read-only, so it did not execute the test suite.

Is this the best way to solve the issue?

No: rejecting invalid new harness runs is the right direction, but deleting the only recovery path for legacy complete exports is not the narrowest safe solution without an explicit archive compatibility decision.

Full review comments:

  • [P1] Preserve recovery for legacy exported runs — scripts/native_eval/fleet.py:1267-1274
    This removes the only fallback for verified full-coverage exports created without an archived exit_status. The changed test confirms those archives now end as failed with an unknown exit code, so existing recoverable campaign exports can be rerun or left failed; retain a bounded legacy path or provide an explicit migration/invalid-archive policy before enforcing the new requirement.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found, but no applicable review policy affected this item.

Codex review notes: model internal, reasoning high; reviewed against 884dd1bb5511.

Labels

Label changes:

  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member, so the external-contributor real-behavior-proof gate does not apply; CI and focused tests are supplemental evidence but do not resolve the recovery compatibility defect.
  • remove status: 📣 needs proof: Current PR status label is status: ⏳ waiting on author.

Label justifications:

  • P1: The patch can cause completed historical evaluation exports to be marked failed and rerun during fleet recovery.
  • merge-risk: 🚨 compatibility: It removes a current fallback for exported archives that lack the newer archived exit-status artifact.
  • merge-risk: 🚨 availability: Affected recovered runs may fail or be rescheduled rather than completing, consuming fleet capacity and delaying campaigns.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🌊 off-meta tidepool and patch quality is 🧂 unranked krab.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The author is a repository member, so the external-contributor real-behavior-proof gate does not apply; CI and focused tests are supplemental evidence but do not resolve the recovery compatibility defect.

Evidence

What I checked:

  • Removed legacy recovery behavior: The PR deletes the complete-archive plus final-checkpoint fallback after archived exit-status lookup; an export with no stored run exit status therefore continues with an unknown code. (scripts/native_eval/fleet.py:1267, 9f4490e8e437)
  • Regression is asserted by the changed test: The PR deliberately changes the full-coverage/final-checkpoint recovery case from completed with inferred exit code 0 to failed with an unknown exit code, so the compatibility change is concrete rather than speculative. (tests/test_native_eval_fleet.py:1276, 9f4490e8e437)
  • Current main previously supports recovery: Current main retains _checkpoint_log_has_final and uses verified result coverage plus a final checkpoint to record an inferred zero exit code when the archive lacks exit_status. (scripts/native_eval/fleet.py:1249, 884dd1bb5511)
  • Feature-history routing: Recent history identifies Vincent Koc as the contributor behind the native-evaluation fleet, aggregation, runtime, and runner surfaces; the available log includes the fleet stabilization and reproducible campaign work. (scripts/native_eval/fleet.py:1217, b9acd9f7a010)
  • Current main has not absorbed this branch: The PR head is not an ancestor of current main, so the requested invalid-run handling is not already implemented on the default branch. (scripts/native_eval/fleet.py:1267, 9f4490e8e437)

Likely related people:

  • vincentkoc: The PR author also authored the recent current-main commits covering fleet recovery, native-evaluation aggregation, runtime handling, and campaign workflow. (role: feature author and recent native-evaluation contributor; confidence: high; commits: b9acd9f7a010, 569b5c39c783, 884dd1bb5511; files: scripts/native_eval/fleet.py, scripts/native_eval/aggregate.py, scripts/native_eval/runtime.py)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (22 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-02T19:15:22.778Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-02T20:37:31.213Z sha 9f4490e :: needs changes before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-02T22:14:45.112Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-03T01:48:46.759Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-03T04:09:40.140Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-03T09:05:49.155Z sha 9f4490e :: found issues before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-03T17:34:34.402Z sha 9f4490e :: needs changes before merge. :: [P1] Preserve recovery for legacy exported runs
  • reviewed 2026-08-03T19:01:56.889Z sha 9f4490e :: needs changes before merge. :: [P1] Preserve recovery for legacy exported runs

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 Urgent regression or broken agent/channel workflow affecting real users now. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 30, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native eval accepts fully invalid harness runs

1 participant